package ia1011.zanzibar.processor.fsm;

import ia1011.zanzibar.featurestructures.FeatureStructure;

/**
 * The class represents a transition of a FSM built over feature structures
 * 
 * @author Alessandro Perrino (creator)
 * @author <br> Bastianelli E. emanuele.bastianelli@gmail.com (modifier)
 * @author <br> Caponi E. emiliano.caponi@gmail.com (modifier)
 * @author <br> Castellucci G. castellucci.giuseppe@gmail.com (modifier)
 * @author <br> Rossi A. berardino.viola@gmail.com (modifier)
 *  
 */
public class Transition {
	// the target state of the transition
	State target; 
	/* the feature structure to be subsumed
	 * for firing the transition
	 * when it is null, it represents a void transition
	 */
	FeatureStructure constraint;  
		
	/**
	 * create a new tansiton
	 * @param featureStucture feature structure which represent the input symbol of transition 
	 * @param state targhet state of transition
	 */
	public Transition(FeatureStructure featureStucture, State state) {
		constraint = featureStucture;
		target = state;
	}
	
	/**
	 * 
	 * @return targhet state
	 */
	public State getTarget() {
		return target;
	}
	
	/**
	 * 
	 * @return feature structure which represent the input symbol of transition
	 */
	public FeatureStructure getConstraint() {
		return constraint;
	}
}
